//变量
$logo: '../images/picture/logo-dark.png';
$bgImg: '../images/image/body-bg.jpg';
$titleBg: "../images/image/title-bg.jpg";

//mixin 混合
@mixin flex($justify: space-between, $align: center) {
  display: flex;
  justify-content: $justify;
  align-items: $align;
}

@mixin img($url, $size: cover) {
  background-image: url($url);
  background-size: $size;
}

@mixin content($maxWidth: 1300px) {
  max-width: $maxWidth;
  margin: 0 auto;
}

//媒体查询
@media screen and (min-width: 1200px) {
  #root > * > div {
    max-width: 1140px;
  }
  .main_img li {
    width: calc((100% - 24px * 3) / 4) !important;
  }
}

@media screen and (min-width: 991px) and (max-width: 1200px) {
  #root > * > div {
    max-width: 960px;
  }
}

@media screen and (max-width: 991px) {
  nav > div {
    flex-wrap: wrap;

    .nav {
      width: 100%;
      height: 0;
      overflow: hidden;
      flex-direction: column;
      top: 100%;
      background-color: #fff;

      & li {
        width: 100%;
      }

      & .nav_child {
        width: calc(100% - 32px);
        display: block;
        position: static;
        margin-left: 32px;

      }
    }
  }
  .btn_nav::before {
    content: '\e643';
    font-family: 'iconfont';
    font-size: 28px;
    color: rgba(0, 0, 0, .55);
  }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  #root > * > div {
    max-width: 720px;
  }
}

@media screen and (max-width: 768px) {
  footer {
    & > div {
      display: block !important;
    }

    & .footer_left {
      padding: 24px 12px 0;
    }

    & .footer_right ul {
      display: block !important;

      & li {
        width: 100% !important;
      }
    }
  }
}

@media screen and (min-width: 576px) and (max-width: 768px) {
  #root > * > div {
    max-width: 720px;
  }
}

@media screen and (max-width: 576px) {
  #root > * > div {
    max-width: 540px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1200px) {
  .main_img li {
    width: calc((100% - 24px) / 2) !important;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

li, {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  color: #37445a;
  font-weight: 600;
}

h4 {
  font-size: 18px;
}

html {
  @include img(#{$bgImg});

}

body {
  @include content;
  background-color: #fff;
  font-size: 14.4px;
  line-height: 1.6;
}

#root {
  overflow: auto;
}

.logo {
  & a {
    @include flex;
    height: 48px;
  }

  & img {
    height: 22px;
  }
}

//nav 头部导航栏
nav {
  box-shadow: 0 4px 10px 0 rgba(69, 61, 80, 0.08);
  padding: 20px 0;
  @include content;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: #fff;

  & > div {
    @include content(960px);
    padding: 0 12px;
    @include flex;
  }


  & a {
    display: block;
  }
}

.nav {
  @include flex(center);
  transition: all 2s;

  & li {
    position: relative;

    & a {
      color: #37445a;
      padding: 6px 10px;
      line-height: 26px;
      margin: 0 7px;
    }

    &:hover {
      & > a, i {
        color: #0466c8;
      }
    }

    &:active {

      & > a, i {
        color: #0466c8;
      }
    }
  }

  & .icon-sanjiao {
    font-size: 5px;
    position: relative;
    top: -4px;
    right: -5px;
  }

  & ul {
    width: 160px;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ededed;
    border-radius: 5px;

  }

}

//section 内容
section, footer {
  @include content;

  & > div {
    @include content(960px);
    padding: 0 12px;
  }

  padding-bottom: 60px;
}

//top1
.section1 {

  & .content {
    @include img(#{$titleBg});

    margin: 148px 0 0;
    padding: 50px 0;
    position: relative;
    border-radius: 4px;

    & div {
      &:nth-child(1) {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        background-color: rgba(237, 237, 237, 0.5);
      }

      &:nth-child(2) {
        position: relative;
        text-align: center;

        & h1 {
          font-size: 36px;
          text-align: center;
          margin-bottom: 5px;

        }

        & h5 {
          font-weight: 500;
          font-size: 14px;
          text-align: center;
        }
      }
    }
  }
}

//top2
.section2 {
  @mixin hover {
    background-color: #0466c8;
    border-radius: 5px;
    & a {
      color: #fff;
    }
  }


  & .nav {
    justify-content: start;
    margin-bottom: 16px;

    & li {
      transition: all .2s ease-in-out;
      margin-right: 14px;
    }

    & a {
      display: block;
      font-size: 13px;
      padding: 6px 14px;
      margin-right: 8px;
    }

    & li:nth-child(1) {
      @include hover;
    }

    & li:hover {
      @include hover;
    }
  }

  & .nav ~ p {
    color: #99a1a9;
    margin-bottom: 16px;
  }

}

.main_img {
  @include flex;
  flex-wrap: wrap;

  & li {
    width: 100%;
    margin-top: 30px;
    position: relative;

    & > a, img {
      width: 100%;
      display: block;
      border-radius: 5px;
    }

    & div {
      visibility: hidden;
      opacity: 0;
      padding: 16px;
      width: 100%;
      position: absolute;
      bottom: 10px;
      background-color: #fff;
      box-shadow: 1px 1px 7px 0 rgba(0, 18, 51, 0.09);
      transition: all .3s ease;

      & a {
        color: #37445a;
      }

      & p:nth-child(3) a {
        color: #99a1a9;

      }
    }

    &:hover div {
      visibility: visible;
      opacity: 1;
    }
  }

  & ~ div {
    margin-top: 3rem;
    text-align: center;

    & a {
      padding: 8px 16px;
      background: #0466c8;
      border-color: #0466c8;
      color: white;
      border-radius: 3px;
    }
  }
}

//top3
.youShang_logo {
  @include flex();
  margin-top: 16px;
  flex: 1;

  & li {
    width: 25%;

    & img {
      width: 90%;
    }
  }
}

//footer 页脚
footer {
  background-color: #f8f9fa !important;
  padding: 48px 0;

  & .logo {
    padding-bottom: 24px;
  }

  & > div {
    padding: 0 16px;
    @include flex;
  }
}

.footer_left {
  & h4 {
    margin-bottom: 8px;
  }

  & p {
    color: #99a1a9;

  }

  & h4:last-child {
    margin-top: 24px;
    color: #0466c8;
  }

}

.footer_right > ul {
  @include flex;
  flex-direction: row;
}

.footer_nav {
  padding: 24px 12px 0;
  width: 160px;

  & h4 {
    margin-bottom: 8px;
  }

  & li {
    padding: 4px 0;

    & a {
      color: #99a1a9 !important;
    }

    &:hover a {
      color: #0466c8 !important;
    }
  }
}

.footer-alt {
  & > div {
    @include content;
    padding: 16px 0;
  }

  background-color: #37445a;


  & div {
    color: #fff;

    & span {
      color: #0d6efd;
    }
  }
}